<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>智慧物流应用平台加油端</title>
		<link rel="stylesheet" href="./css/common.css">
		<link rel="stylesheet" href="./css/css.css">
		<link rel="stylesheet" href="./layui/css/layui.css">
		<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="wrap" id="wrap">
			<div class="inner">
				<div class="title">
					<img src="img/logo.png" >
					<span>| 智慧物流应用平台加油端</span>
				</div>
				<div class="login">
					<div class="sub-title">会员登录</div>
					<div class="item"><input type="text" autocomplete="off" name="name" id="name" value="" placeholder="请输入登录账号"/></div>
					<div class="item item1"><input type="password" name="password" id="password" value=""placeholder="请输入登录密码" /></div>
					<div class="remenber clearfix">
						<p class="fl"><input type="checkbox" name="" id="" value="" /> 自动登录</p>
						<p class="fr"><a href=""> 忘记密码？</a></p>
					</div>
					<div class="btn">
						<button type="button" id="btn">登  录</button>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script src="./layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['layer','jquery'], function(){
	    layer = layui.layer;
		var $ = layui.$;
		// 信息验证
		$('#name')[0].onblur = function() {
				var namevalue = this.value;
				if(!namevalue){
					layer.tips(
						'<p style="color:#fff;">请输入账号~~</p>',
						'#name',
						{
							tips: [3, '#0066ff'],
							anim: 6,
							time: 2500,
						}
					);
				}else{
					return true;
				}
			}
		$('#password')[0].onblur = function() {
				var password = this.value;
				if(!password){
					layer.tips(
						'<p style="color:#fff;">请输入密码~~</p>',
						'#password',
						{
							tips: [3, '#0066ff'],
							anim: 6,
							time: 2500,
						}
					);
				}else{
					return true;
				}
			}
		$("#btn").click(function(){	
			if($('#name')[0].onblur()){
				if($('#password')[0].onblur()){
					//layer.alert('登录成功')
					window.location.href='index.html'
				}
			}					
		}) 
		document.getElementById('wrap').onkeyup = function (e) {
			var ev = document.all ? window.event : e;
			if (ev.keyCode === 13) {
				$('#btn').click();
			}
		};
	})
</script>
</html>